<!DOCTYPE html>
<html lang="zh-CN">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Git 大型项目优化指南 | 技术小馆</title>
    <link rel="stylesheet" href="https://cdn.staticfile.org/font-awesome/6.4.0/css/all.min.css">
    <link rel="stylesheet" href="https://cdn.staticfile.org/tailwindcss/2.2.19/tailwind.min.css">
    <link href="https://fonts.googleapis.com/css2?family=Noto+Serif+SC:wght@400;500;600;700&family=Noto+Sans+SC:wght@300;400;500;700&display=swap" rel="stylesheet">
    <style>
        body {
            font-family: 'Noto Sans SC', Tahoma, Arial, Roboto, "Droid Sans", "Helvetica Neue", "Droid Sans Fallback", "Heiti SC", "Hiragino Sans GB", Simsun, sans-serif;
            line-height: 1.8;
            color: #333;
            background-color: #f9fafb;
        }
        h1, h2, h3, h4, h5, h6 {
            font-family: 'Noto Serif SC', serif;
            font-weight: 600;
            margin-top: 2rem;
            margin-bottom: 1rem;
        }
        .hero {
            background: linear-gradient(135deg, #4f46e5 0%, #7c3aed 100%);
        }
        .code-block {
            background-color: #2d3748;
            color: #e2e8f0;
            border-radius: 0.5rem;
            position: relative;
        }
        .code-block pre {
            padding: 1.5rem;
            overflow-x: auto;
        }
        .code-block:before {
            content: '';
            position: absolute;
            top: 12px;
            left: 12px;
            width: 12px;
            height: 12px;
            border-radius: 50%;
            background: #ff5f56;
            box-shadow: 20px 0 #ffbd2e, 40px 0 #27c93f;
        }
        .card {
            transition: transform 0.3s ease, box-shadow 0.3s ease;
        }
        .card:hover {
            transform: translateY(-5px);
            box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
        }
        .visualization {
            background-color: white;
            border-radius: 0.5rem;
            padding: 2rem;
            box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
        }
        .list-item {
            position: relative;
            padding-left: 1.5rem;
        }
        .list-item:before {
            content: '';
            position: absolute;
            left: 0;
            top: 0.75rem;
            width: 0.5rem;
            height: 0.5rem;
            border-radius: 50%;
            background-color: #4f46e5;
        }
    </style>
</head>
<body>
    <!-- Hero Section -->
    <section class="hero text-white py-20 px-4 md:px-0">
        <div class="container mx-auto max-w-5xl">
            <div class="flex flex-col md:flex-row items-center">
                <div class="md:w-2/3">
                    <div class="mb-2 text-purple-200 flex items-center">
                        <span class="mr-2"><i class="fas fa-code-branch"></i></span>
                        <span>Git 性能优化</span>
                    </div>
                    <h1 class="text-4xl md:text-5xl font-bold leading-tight mb-4">大型项目 Git 操作优化指南</h1>
                    <p class="text-xl text-purple-100 mb-8">解决仓库膨胀、操作卡顿、克隆缓慢等性能问题</p>
                    <div class="flex flex-wrap gap-4">
                        <a href="#causes" class="bg-white text-purple-700 hover:bg-purple-50 px-6 py-3 rounded-full font-medium transition-all duration-300 flex items-center">
                            <i class="fas fa-search mr-2"></i> 问题原因
                        </a>
                        <a href="#solutions" class="bg-purple-800 hover:bg-purple-700 px-6 py-3 rounded-full font-medium transition-all duration-300 flex items-center">
                            <i class="fas fa-tools mr-2"></i> 解决方案
                        </a>
                    </div>
                </div>
                <div class="md:w-1/3 mt-10 md:mt-0 flex justify-center">
                    <div class="relative">
                        <div class="absolute -top-6 -left-6 w-24 h-24 bg-purple-300 rounded-full opacity-20"></div>
                        <div class="absolute -bottom-6 -right-6 w-24 h-24 bg-purple-400 rounded-full opacity-20"></div>
                        <div class="relative z-10 bg-white p-6 rounded-lg shadow-xl text-gray-800 w-64">
                            <div class="flex justify-between items-center mb-4">
                                <div class="text-sm font-medium text-gray-500">git status</div>
                                <div class="text-xs px-2 py-1 bg-purple-100 text-purple-800 rounded-full">优化前: 5.2s</div>
                            </div>
                            <div class="h-2 bg-gray-200 rounded-full overflow-hidden">
                                <div class="h-full bg-purple-500 rounded-full" style="width: 100%"></div>
                            </div>
                            <div class="mt-6 flex justify-between items-center mb-4">
                                <div class="text-sm font-medium text-gray-500">优化后</div>
                                <div class="text-xs px-2 py-1 bg-green-100 text-green-800 rounded-full">0.3s</div>
                            </div>
                            <div class="h-2 bg-gray-200 rounded-full overflow-hidden">
                                <div class="h-full bg-green-500 rounded-full" style="width: 15%"></div>
                            </div>
                            <div class="mt-6 text-center">
                                <div class="text-3xl font-bold text-purple-600">85%</div>
                                <div class="text-xs text-gray-500">性能提升</div>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </section>

    <!-- Main Content -->
    <main class="container mx-auto max-w-5xl px-4 md:px-0 py-12">
        <!-- Introduction -->
        <section class="mb-16">
            <div class="bg-white rounded-xl shadow-md overflow-hidden">
                <div class="p-8">
                    <div class="flex items-center mb-6">
                        <div class="w-12 h-12 rounded-full bg-purple-100 flex items-center justify-center text-purple-600 mr-4">
                            <i class="fas fa-info-circle text-xl"></i>
                        </div>
                        <h2 class="text-2xl font-bold">问题背景</h2>
                    </div>
                    <p class="text-gray-700 mb-6">在大型项目开发中，Git 作为分布式版本控制系统，提供了强大的代码管理能力。然而，随着代码库的增长，Git 操作的速度可能会变慢，例如 <code class="bg-gray-100 px-2 py-1 rounded">git status</code> 变得卡顿、<code class="bg-gray-100 px-2 py-1 rounded">git clone</code> 变得缓慢、<code class="bg-gray-100 px-2 py-1 rounded">git pull</code> 和 <code class="bg-gray-100 px-2 py-1 rounded">git fetch</code> 需要很长时间等。这些问题在大型团队协作、微服务架构、多分支开发时尤为明显。</p>
                    
                    <div class="mt-8">
                        <div class="visualization">
                            <div class="mermaid">
                                graph TD
                                    A[Git 性能问题] --> B[仓库体积过大]
                                    A --> C[工作目录文件过多]
                                    A --> D[远程操作开销大]
                                    A --> E[分支过多且维护不善]
                                    A --> F[CI/CD 过载]
                            </div>
                        </div>
                    </div>
                </div>
            </div>
        </section>

        <!-- Causes Section -->
        <section id="causes" class="mb-16">
            <h2 class="text-3xl font-bold mb-8 flex items-center">
                <span class="w-10 h-10 rounded-full bg-purple-100 text-purple-700 flex items-center justify-center mr-4">
                    <i class="fas fa-search"></i>
                </span>
                一、大项目 Git 操作变慢的原因
            </h2>
            
            <div class="grid md:grid-cols-2 gap-6">
                <div class="card bg-white rounded-xl shadow-md overflow-hidden">
                    <div class="p-6">
                        <div class="flex items-center mb-4">
                            <div class="w-10 h-10 rounded-full bg-red-100 text-red-600 flex items-center justify-center mr-4">
                                <i class="fas fa-database"></i>
                            </div>
                            <h3 class="text-xl font-bold">仓库体积过大</h3>
                        </div>
                        <p class="text-gray-700">项目积累了大量历史提交、二进制文件、日志文件等，使得 <code class="bg-gray-100 px-1 py-0.5 rounded">.git</code> 目录膨胀。</p>
                    </div>
                </div>
                
                <div class="card bg-white rounded-xl shadow-md overflow-hidden">
                    <div class="p-6">
                        <div class="flex items-center mb-4">
                            <div class="w-10 h-10 rounded-full bg-blue-100 text-blue-600 flex items-center justify-center mr-4">
                                <i class="fas fa-file"></i>
                            </div>
                            <h3 class="text-xl font-bold">工作目录文件过多</h3>
                        </div>
                        <p class="text-gray-700">代码仓库中存在大量文件，每次执行 <code class="bg-gray-100 px-1 py-0.5 rounded">git status</code> 或 <code class="bg-gray-100 px-1 py-0.5 rounded">git diff</code> 时，Git 需要扫描和计算文件变更，影响速度。</p>
                    </div>
                </div>
                
                <div class="card bg-white rounded-xl shadow-md overflow-hidden">
                    <div class="p-6">
                        <div class="flex items-center mb-4">
                            <div class="w-10 h-10 rounded-full bg-green-100 text-green-600 flex items-center justify-center mr-4">
                                <i class="fas fa-cloud"></i>
                            </div>
                            <h3 class="text-xl font-bold">远程操作开销大</h3>
                        </div>
                        <p class="text-gray-700"><code class="bg-gray-100 px-1 py-0.5 rounded">git fetch</code> 和 <code class="bg-gray-100 px-1 py-0.5 rounded">git pull</code> 需要同步远程仓库的所有历史记录，在仓库较大时，会导致网络流量和计算量剧增。</p>
                    </div>
                </div>
                
                <div class="card bg-white rounded-xl shadow-md overflow-hidden">
                    <div class="p-6">
                        <div class="flex items-center mb-4">
                            <div class="w-10 h-10 rounded-full bg-yellow-100 text-yellow-600 flex items-center justify-center mr-4">
                                <i class="fas fa-code-branch"></i>
                            </div>
                            <h3 class="text-xl font-bold">分支过多且维护不善</h3>
                        </div>
                        <p class="text-gray-700">仓库中可能存在大量过时或未清理的分支，使 <code class="bg-gray-100 px-1 py-0.5 rounded">git branch</code> 和 <code class="bg-gray-100 px-1 py-0.5 rounded">git checkout</code> 变慢。</p>
                    </div>
                </div>
            </div>
        </section>

        <!-- Solutions Section -->
        <section id="solutions">
            <h2 class="text-3xl font-bold mb-8 flex items-center">
                <span class="w-10 h-10 rounded-full bg-purple-100 text-purple-700 flex items-center justify-center mr-4">
                    <i class="fas fa-tools"></i>
                </span>
                二、优化 Git 仓库结构
            </h2>
            
            <div class="space-y-12">
                <!-- Solution 1 -->
                <div class="bg-white rounded-xl shadow-md overflow-hidden">
                    <div class="p-8">
                        <div class="flex items-start">
                            <div class="mr-6 bg-purple-100 text-purple-700 rounded-lg p-4">
                                <i class="fas fa-file-archive text-2xl"></i>
                            </div>
                            <div class="flex-1">
                                <h3 class="text-2xl font-bold mb-4">1. 采用 Git LFS 处理大文件</h3>
                                <p class="text-gray-700 mb-6">如果项目包含大量的二进制文件（如图片、视频、数据模型等），这些文件会导致 <code class="bg-gray-100 px-1 py-0.5 rounded">.git</code> 目录膨胀，并拖慢 <code class="bg-gray-100 px-1 py-0.5 rounded">clone</code> 和 <code class="bg-gray-100 px-1 py-0.5 rounded">pull</code>。可以使用 <strong>Git LFS（Large File Storage）</strong> 让 Git 仅存储指向这些大文件的引用，而实际内容托管在 Git LFS 服务器上。</p>
                                
                                <h4 class="text-lg font-semibold mb-3 text-gray-800">安装 Git LFS：</h4>
                                <div class="code-block mb-6">
                                    <pre><code>git lfs install</code></pre>
                                </div>
                                
                                <h4 class="text-lg font-semibold mb-3 text-gray-800">添加需要 LFS 存储的文件类型（例如 .zip 文件）：</h4>
                                <div class="code-block">
                                    <pre><code>git lfs track "*.zip"
git add .gitattributes
git commit -m "使用 Git LFS 追踪 .zip 文件"</code></pre>
                                </div>
                                
                                <p class="text-gray-700 mt-6">这样，Git 只会存储 <code class="bg-gray-100 px-1 py-0.5 rounded">.zip</code> 文件的指针，而不会将其直接存入 <code class="bg-gray-100 px-1 py-0.5 rounded">.git</code> 目录，大幅降低 Git 历史记录的体积。</p>
                            </div>
                        </div>
                    </div>
                </div>
                
                <!-- Solution 2 -->
                <div class="bg-white rounded-xl shadow-md overflow-hidden">
                    <div class="p-8">
                        <div class="flex items-start">
                            <div class="mr-6 bg-purple-100 text-purple-700 rounded-lg p-4">
                                <i class="fas fa-broom text-2xl"></i>
                            </div>
                            <div class="flex-1">
                                <h3 class="text-2xl font-bold mb-4">2. 清理 .git 目录，减少历史冗余</h3>
                                <p class="text-gray-700 mb-6">随着项目的增长，<code class="bg-gray-100 px-1 py-0.5 rounded">.git</code> 目录会积累大量的历史数据，可以使用以下方法优化：</p>
                                
                                <h4 class="text-lg font-semibold mb-3 text-gray-800">清理未引用的对象：</h4>
                                <div class="code-block mb-6">
                                    <pre><code>git gc --prune=now</code></pre>
                                </div>
                                
                                <h4 class="text-lg font-semibold mb-3 text-gray-800">强制瘦身仓库（谨慎使用）：</h4>
                                <div class="code-block mb-6">
                                    <pre><code>git reflog expire --expire=now --all
git gc --aggressive --prune=now</code></pre>
                                </div>
                                
                                <h4 class="text-lg font-semibold mb-3 text-gray-800">删除大文件历史记录（避免仓库过大）：</h4>
                                <div class="code-block mb-6">
                                    <pre><code>git filter-repo --path bigfile.zip --invert-paths</code></pre>
                                </div>
                                
                                <p class="text-gray-700">然后，强制推送到远程：</p>
                                <div class="code-block">
                                    <pre><code>git push origin --force --all</code></pre>
                                </div>
                            </div>
                        </div>
                    </div>
                </div>
                
                <!-- Solution 3 -->
                <div class="bg-white rounded-xl shadow-md overflow-hidden">
                    <div class="p-8">
                        <div class="flex items-start">
                            <div class="mr-6 bg-purple-100 text-purple-700 rounded-lg p-4">
                                <i class="fas fa-download text-2xl"></i>
                            </div>
                            <div class="flex-1">
                                <h3 class="text-2xl font-bold mb-4">3. 克隆时只获取最新提交（浅克隆）</h3>
                                <p class="text-gray-700 mb-6">当新成员加入团队或 CI/CD 拉取代码时，不需要完整的历史记录，可以使用 <strong>浅克隆</strong>（<code class="bg-gray-100 px-1 py-0.5 rounded">--depth=1</code>）加速：</p>
                                
                                <div class="code-block mb-6">
                                    <pre><code>git clone --depth=1 https://github.com/your-repo.git</code></pre>
                                </div>
                                
                                <p class="text-gray-700">这样只克隆最新的提交，大幅减少下载时间。</p>
                                
                                <p class="text-gray-700 mt-4">如果后续需要完整历史，可以执行：</p>
                                <div class="code-block">
                                    <pre><code>git fetch --unshallow</code></pre>
                                </div>
                            </div>
                        </div>
                    </div>
                </div>
                
                <!-- Solution 4 -->
                <div class="bg-white rounded-xl shadow-md overflow-hidden">
                    <div class="p-8">
                        <div class="flex items-start">
                            <div class="mr-6 bg-purple-100 text-purple-700 rounded-lg p-4">
                                <i class="fas fa-code-branch text-2xl"></i>
                            </div>
                            <div class="flex-1">
                                <h3 class="text-2xl font-bold mb-4">4. 分支优化：删除过时分支</h3>
                                <p class="text-gray-700 mb-6">长期未使用的分支会拖慢 <code class="bg-gray-100 px-1 py-0.5 rounded">git branch</code> 和 <code class="bg-gray-100 px-1 py-0.5 rounded">git checkout</code>，建议定期清理本地和远程分支：</p>
                                
                                <h4 class="text-lg font-semibold mb-3 text-gray-800">删除本地已合并分支：</h4>
                                <div class="code-block mb-6">
                                    <pre><code>git branch --merged | grep -v "\*" | xargs -n 1 git branch -d</code></pre>
                                </div>
                                
                                <h4 class="text-lg font-semibold mb-3 text-gray-800">删除远程已删除的分支：</h4>
                                <div class="code-block mb-6">
                                    <pre><code>git fetch -p</code></pre>
                                </div>
                                
                                <h4 class="text-lg font-semibold mb-3 text-gray-800">清理远程无用分支：</h4>
                                <div class="code-block">
                                    <pre><code>git branch -r | awk '{print $1}' | grep -v 'main' | xargs -n 1 git push --delete origin</code></pre>
                                </div>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
        </section>
        
        <!-- Local Optimization -->
        <section class="mt-16">
            <h2 class="text-3xl font-bold mb-8 flex items-center">
                <span class="w-10 h-10 rounded-full bg-purple-100 text-purple-700 flex items-center justify-center mr-4">
                    <i class="fas fa-laptop-code"></i>
                </span>
                三、优化 Git 本地操作
            </h2>
            
            <div class="space-y-8">
                <div class="bg-white rounded-xl shadow-md overflow-hidden">
                    <div class="p-8">
                        <h3 class="text-2xl font-bold mb-4">1. 加速 git status</h3>
                        <p class="text-gray-700 mb-6">当代码文件较多时，<code class="bg-gray-100 px-1 py-0.5 rounded">git status</code> 可能会变慢，可以使用以下方法优化：</p>
                        
                        <div class="grid md:grid-cols-2 gap-6">
                            <div>
                                <h4 class="text-lg font-semibold mb-3 text-gray-800">让 Git 忽略未跟踪的文件</h4>
                                <p class="text-gray-700 mb-4">（适用于构建目录或临时文件较多的项目）：</p>
                                <div class="code-block">
                                    <pre><code>git config --global status.showUntrackedFiles no</code></pre>
                                </div>
                            </div>
                            
                            <div>
                                <h4 class="text-lg font-semibold mb-3 text-gray-800">启用 fsmonitor</h4>
                                <p class="text-gray-700 mb-4">（仅支持较新版本 Git）：</p>
                                <div class="code-block">
                                    <pre><code>git config --global core.fsmonitor true</code></pre>
                                </div>
                            </div>
                        </div>
                        
                        <p class="text-gray-700 mt-6">这会让 Git 只扫描有变动的文件，而不是每次都重新计算所有文件的状态。</p>
                    </div>
                </div>
                
                <div class="bg-white rounded-xl shadow-md overflow-hidden">
                    <div class="p-8">
                        <h3 class="text-2xl font-bold mb-4">2. 加速 git checkout</h3>
                        <p class="text-gray-700 mb-4">当分支较多时，<code class="bg-gray-100 px-1 py-0.5 rounded">git checkout</code> 可能会变慢，可以启用工作区索引缓存：</p>
                        <div class="code-block">
                            <pre><code>git config --global core.preloadindex true</code></pre>
                        </div>
                    </div>
                </div>
                
                <div class="bg-white rounded-xl shadow-md overflow-hidden">
                    <div class="p-8">
                        <h3 class="text-2xl font-bold mb-4">3. 加速 git log</h3>
                        <p class="text-gray-700 mb-4">当 Git 历史记录较多时，<code class="bg-gray-100 px-1 py-0.5 rounded">git log</code> 可能变慢，可以限制查询范围，例如只查看最近 100 条提交：</p>
                        <div class="code-block mb-6">
                            <pre><code>git log -n 100 --oneline</code></pre>
                        </div>
                        <p class="text-gray-700">或者按时间范围查询：</p>
                        <div class="code-block">
                            <pre><code>git log --since="2 weeks ago"</code></pre>
                        </div>
                    </div>
                </div>
            </div>
        </section>
        
        <!-- Remote Optimization -->
        <section class="mt-16">
            <h2 class="text-3xl font-bold mb-8 flex items-center">
                <span class="w-10 h-10 rounded-full bg-purple-100 text-purple-700 flex items-center justify-center mr-4">
                    <i class="fas fa-cloud"></i>
                </span>
                四、优化 Git 远程操作
            </h2>
            
            <div class="space-y-8">
                <div class="bg-white rounded-xl shadow-md overflow-hidden">
                    <div class="p-8">
                        <h3 class="text-2xl font-bold mb-4">1. 加速 git pull 和 git fetch</h3>
                        
                        <h4 class="text-lg font-semibold mb-3 text-gray-800">只拉取特定分支（避免拉取所有分支历史）：</h4>
                        <div class="code-block mb-6">
                            <pre><code>git fetch origin main</code></pre>
                        </div>
                        
                        <h4 class="text-lg font-semibold mb-3 text-gray-800">禁用 git pull 自动合并（避免多余的冲突）：</h4>
                        <div class="code-block">
                            <pre><code>git config --global pull.ff only</code></pre>
                        </div>
                    </div>
                </div>
                
                <div class="bg-white rounded-xl shadow-md overflow-hidden">
                    <div class="p-8">
                        <h3 class="text-2xl font-bold mb-4">2. 使用镜像仓库减少拉取时间</h3>
                        <p class="text-gray-700 mb-6">如果团队分布在不同地域，直接从 GitHub/GitLab 拉取代码可能会变慢，可以搭建 <strong>Git 镜像仓库</strong>：</p>
                        
                        <div class="code-block mb-6">
                            <pre><code>git remote add mirror https://your-mirror.git
git fetch mirror</code></pre>
                        </div>
                        
                        <p class="text-gray-700">然后切换到本地镜像，提高拉取速度。</p>
                    </div>
                </div>
            </div>
        </section>
        
        <!-- CI/CD Optimization -->
        <section class="mt-16">
            <h2 class="text-3xl font-bold mb-8 flex items-center">
                <span class="w-10 h-10 rounded-full bg-purple-100 text-purple-700 flex items-center justify-center mr-4">
                    <i class="fas fa-server"></i>
                </span>
                五、优化 Git 在 CI/CD 中的使用
            </h2>
            
            <div class="space-y-8">
                <div class="bg-white rounded-xl shadow-md overflow-hidden">
                    <div class="p-8">
                        <h3 class="text-2xl font-bold mb-4">1. 在 CI/CD 中使用浅克隆</h3>
                        <p class="text-gray-700 mb-6">在 CI/CD 服务器上拉取代码时，可以使用 <strong>浅克隆</strong> 只获取最新提交：</p>
                        
                        <div class="code-block mb-6">
                            <pre><code>git clone --depth=1 https://github.com/your-repo.git</code></pre>
                        </div>
                        
                        <p class="text-gray-700">或者在 GitLab CI/CD 配置中：</p>
                        <div class="code-block">
                            <pre><code class="language-yaml">variables:
  GIT_DEPTH: 1</code></pre>
                        </div>
                    </div>
                </div>
                
                <div class="bg-white rounded-xl shadow-md overflow-hidden">
                    <div class="p-8">
                        <h3 class="text-2xl font-bold mb-4">2. 避免在 CI/CD 中频繁执行 git clean</h3>
                        <p class="text-gray-700">一些 CI/CD 任务会频繁执行 <code class="bg-gray-100 px-1 py-0.5 rounded">git clean -fdx</code>，但这可能会降低效率。如果不影响构建结果，建议保留部分缓存目录。</p>
                    </div>
                </div>
            </div>
        </section>
        
        <!-- Summary -->
        <section class="mt-16">
            <div class="bg-purple-50 rounded-xl p-8 border border-purple-100">
                <div class="flex items-center mb-6">
                    <div class="w-12 h-12 rounded-full bg-purple-100 text-purple-700 flex items-center justify-center mr-4">
                        <i class="fas fa-lightbulb text-xl"></i>
                    </div>
                    <h2 class="text-2xl font-bold">优化总结</h2>
                </div>
                
                <div class="grid md:grid-cols-2 gap-6">
                    <div class="bg-white p-6 rounded-lg">
                        <h3 class="text-lg font-semibold mb-4 text-purple-700">最佳实践清单</h3>
                        <ul class="space-y-3">
                            <li class="list-item">使用 Git LFS 管理大文件</li>
                            <li class="list-item">定期清理 .git 目录和历史记录</li>
                            <li class="list-item">CI/CD 中使用浅克隆</li>
                            <li class="list-item">及时清理无用分支</li>
                            <li class="list-item">启用 fsmonitor 加速文件状态检查</li>
                        </ul>
                    </div>
                    
                    <div class="bg-white p-6 rounded-lg">
                        <h3 class="text-lg font-semibold mb-4 text-purple-700">预期效果</h3>
                        <div class="flex items-center mb-4">
                            <div class="w-16 h-16 bg-green-100 text-green-700 rounded-full flex items-center justify-center mr-4">
                                <i class="fas fa-bolt text-2xl"></i>
                            </div>
                            <div>
                                <div class="text-2xl font-bold">10x</div>
                                <div class="text-sm text-gray-600">操作速度提升</div>
                            </div>
                        </div>
                        <div class="flex items-center">
                            <div class="w-16 h-16 bg-blue-100 text-blue-700 rounded-full flex items-center justify-center mr-4">
                                <i class="fas fa-database text-2xl"></i>
                            </div>
                            <div>
                                <div class="text-2xl font-bold">80%</div>
                                <div class="text-sm text-gray-600">仓库体积减小</div>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
        </section>
    </main>

    <!-- Footer -->
    <footer class="bg-gray-900 text-gray-300 py-12">
        <div class="container mx-auto max-w-5xl px-4 md:px-0">
            <div class="flex flex-col md:flex-row justify-between items-center">
                <div class="mb-6 md:mb-0">
                    <h3 class="text-xl font-bold text-white mb-2">技术小馆</h3>
                    <p class="text-gray-400">专业的技术分享平台</p>
                </div>
                <div>
                    <a href="http://www.yuque.com/jtostring" class="text-purple-400 hover:text-purple-300 transition-colors duration-300 flex items-center">
                        <i class="fas fa-external-link-alt mr-2"></i>
                        <span>访问技术小馆</span>
                    </a>
                </div>
            </div>
            <div class="mt-8 pt-8 border-t border-gray-800 text-center text-sm text-gray-500">
                &copy; 2023 技术小馆. 版权所有.
            </div>
        </div>
    </footer>

    <script src="https://cdn.jsdelivr.net/npm/mermaid@latest/dist/mermaid.min.js"></script>
    <script>
        mermaid.initialize({
            startOnLoad: true,
            theme: 'default',
            flowchart: {
                useMaxWidth: true,
                htmlLabels: true,
                curve: 'basis'
            }
        });
        
        // 平滑滚动
        document.querySelectorAll('a[href^="#"]').forEach(anchor => {
            anchor.addEventListener('click', function (e) {
                e.preventDefault();
                document.querySelector(this.getAttribute('href')).scrollIntoView({
                    behavior: 'smooth'
                });
            });
        });
    </script>
</body>
</html>